package com.fattyCorps.exception;

import com.fattyCorps.obj.msg.HttpStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class CustomBaseException extends RuntimeException {
    protected Integer code;
    protected String msg;

    public CustomBaseException(HttpStatus status) {
        super(status.getMsg());
        this.msg = status.getMsg();
        this.code = status.getCode();
    }

    public CustomBaseException(Integer code, String msg) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }
}
